﻿Imports System.Text
Imports FTTK.Entities

Namespace FTTK.Utilities
    Friend NotInheritable Class RequestPostHelper
        Private Sub New()

        End Sub

        Public Shared Function GetLoginUserPost(ByVal username As String, ByVal password As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("login={0}", username)
            strBuild.AppendFormat("&pass={0}", password)
            Return strBuild.ToString()
        End Function

        Public Shared Function GetLogoutUserPost(ByVal sessionId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("session_token={0}", sessionId)
            Return strBuild.ToString()
        End Function

        Public Shared Function CreateUserGalleryPost(ByVal galleryName As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("name={0}", galleryName)
            Return strBuild.ToString()
        End Function

        Public Shared Function DeleteUserGalleryPost(ByVal galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("id={0}", galleryId)
            Return strBuild.ToString()
        End Function

        Public Shared Function AddToUserGalleryPost(contentId As Integer, galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("content_id={0}", contentId)
            If Not String.IsNullOrEmpty(galleryId) Then
                strBuild.AppendFormat("&id={0}", galleryId)
            End If
            Return strBuild.ToString()
        End Function

        Public Shared Function RemoveFromUserGalleryPost(contentId As Integer, galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("content_id={0}", contentId)
            If Not String.IsNullOrEmpty(galleryId) Then
                strBuild.AppendFormat("&id={0}", galleryId)
            End If
            Return strBuild.ToString()
        End Function

        Public Shared Function MoveUpMediaInUserGalleryPost(ByVal mediaId As Integer, ByVal galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("content_id={0}", mediaId)
            If Not String.IsNullOrEmpty(galleryId) Then
                strBuild.AppendFormat("&id={0}", galleryId)
            End If
            Return strBuild.ToString()
        End Function

        Public Shared Function MoveDownMediaInUserGalleryPost(ByVal mediaId As Integer, ByVal galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("content_id={0}", mediaId)
            If Not String.IsNullOrEmpty(galleryId) Then
                strBuild.AppendFormat("&id={0}", galleryId)
            End If
            Return strBuild.ToString()
        End Function

        Public Shared Function MoveMediaToTopInUserGalleryPost(ByVal mediaId As Integer, ByVal galleryId As String) As String
            Dim strBuild As New StringBuilder
            strBuild.AppendFormat("content_id={0}", mediaId)
            If Not String.IsNullOrEmpty(galleryId) Then
                strBuild.AppendFormat("&id={0}", galleryId)
            End If
            Return strBuild.ToString()
        End Function
    End Class
End Namespace